home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / PowerPC / vbcc / doc / pasm.doc < prev    next >
Text File  |  1998-08-02  |  44KB  |  2,144 lines

  1. pasm V1.1          VBCC ANSI C Compiler Reference Manual            pasm V1.1
  2.  
  3. NAME
  4.      pasm - PowerPC assembler
  5.  
  6. SYNOPSIS
  7.      pasm [-mwxRVX] [-B address] [-D symbol[=value]] [-F format]
  8.           [-I include-path] [-O opt-level] [-o filename] source-file
  9.  
  10. DESCRIPTION
  11.      pasm is a 32/64-bit PowerPC assembler and its usual task is to
  12.      assemble the output of the vbcc C compiler. It supports macros
  13.      and include files, so it could also be used for direct PowerPC
  14.      program development.
  15.  
  16.      pasm uses the same syntax as Motorola's PAS assembler or the
  17.      PPC-port of the GNU assembler.
  18.  
  19.      All PowerPC standard instructions are supported: User level-,
  20.      supervisor level-, optional-, 32-bit and 64-bit instructions.
  21.      Additionally, there is a huge set of extended mnemonics as proposed
  22.      in the "PowerPC Programming Environments" from IBM and Motorola.
  23.  
  24.      The options are as follows:
  25.  
  26.      -B address
  27.              Sets the base address for absolute output format.
  28.  
  29.      -D symbol[=value]
  30.              Defines a symbol. Its value defaults to '1'.
  31.  
  32.      -F format
  33.              Sets the output file format:
  34.              0: Absolute, raw format. Base address defaults to
  35.                 zero, but may be changed by "-B addr".
  36.              1: ELF-32bit-PowerPC object.
  37.              2: EHF object. Only used under AmigaOS with WarpOS
  38.                 extension from Haage&Partner.
  39.              3: ADOS object. The difference between ADOS and and EHF
  40.                 is, that ADOS uses HUNK_CODE instead HUNK_PPC_CODE
  41.                 and doesn't support any PPC-specific relocations and
  42.                 reference types. This makes it possible to link
  43.                 simple PowerPC programs with an old linker, like
  44.                 BLink, SLink or PhxLnk.
  45.  
  46.      -I include-path
  47.              Adds another include file path. Example:
  48.              -IWork:PPCIncludes  or  -I /usr/local/include
  49.  
  50.      -m64    Enable 64-bit instructions.
  51.  
  52.      -ms     Enable supervisor instructions.
  53.  
  54.      -mo     Enable optional instructions.
  55.  
  56.      -O opt-level
  57.              Sets optimization level. The level contains 32 flags to
  58.              enable different optimizations and features. Currently,
  59.              the following are used:
  60.              0x00010000: Automatic correction of far branches. A
  61.                          "Bcc label" with label out of range (more
  62.                          than 32764 bytes away) will be converted
  63.                          into a "B!cc $+8 / B label" combination.
  64.  
  65.      -o filename
  66.              Specifies the name of the output file. If not given, pasm
  67.              will use the name of the source text and replaces the
  68.              extension by ".o".
  69.  
  70.      -R      Don't predefine register symbols r0-r31, f0-f31, cr0-c7,
  71.              xer, eq, etc.
  72.  
  73.      -V      Prints version identification and build string. Example:
  74.              pasm V0.69 (Amiga OS/M68k)  (c)1997-98 by Frank Wille
  75.              build date: Jan  2 1998, 11:51:47
  76.  
  77.      -w      Suppress all warning messages.
  78.  
  79.      -x      Undefined symbols are automatically defined as external
  80.              symbols.
  81.  
  82.      -X      No extended mnemonics. This means you will have to write
  83.              "bc 12,2,label" instead "beq label". All predefined extened
  84.              mnemonics are listed in the section EXTENDED MNEMONICS.
  85.  
  86.  
  87. GENERAL FORMAT
  88.      Source texts in the following format will be accepted by pasm:
  89.  
  90.      [<label>] [<opcode> [<operand>[,<operand>,...]]]
  91.  
  92.      The opcode field may start at the first column, because pasm requires
  93.      all labels to be terminated by a ':'. Opcodes are directives, macros
  94.      and PowerPC instructions.
  95.  
  96.      These statements are separated by a line feed (0xa) or a ';' character.
  97.      Theoretically, you can write your whole program in a single line.
  98.      Example:
  99.  
  100.      .text;.global start;start: li r3,0;blr
  101.  
  102.      Comments are introduced by a '#':
  103.  
  104.      # This is a comment
  105.              nop     # another comment
  106.  
  107.  
  108. DIRECTIVES
  109.       .ascii <exp1>[,<exp2>,"<string1>"...]
  110.       ----------------------------------
  111.       See ".byte".
  112.  
  113.       .asciiz "<string1>"[,"<string2>"...]
  114.       ------------------------------------
  115.       See ".string".
  116.  
  117.       .align <bit_count>
  118.       ------------------
  119.       Insert as much zero bytes as required to reach an address where
  120.       <bit_count> low order bits are zero. For example ".align 2" would
  121.       make an alignment to the next 32-bit boundary.
  122.  
  123.       .baserel <section>,<base_reg>
  124.       -----------------------------
  125.       Allow base relative access via register <base_reg> in the section
  126.       called <section>. In absolute mode, <base_reg> must be initialized
  127.       with an address pointing 32764 bytes behind the start address of
  128.       this section. In EHF, <base_reg> must be initialized with the linker
  129.       symbol _LinkerDB. In ELF/SystemV ABI small data or TOC addressing
  130.       is not supported. (?)
  131.       By default, base relative access via r2 (rtoc) on the section
  132.       ".tocd" is set.
  133.       This directive is obsolete, since pasm V1.1!
  134.       pasm can access multiple small data sections using the .sdreg
  135.       directive now. .baselrel may be useful, when creating an
  136.       absolute output file, though.
  137.  
  138.       .bss <symbol>,<size>[,<alignment>]
  139.       ----------------------------------
  140.       Allocate <size> bytes of space in the .bss section and assign
  141.       the value to that location to <symbol>. If <alignment> is given,
  142.       then the space will be aligned to an address having <alignment>
  143.       low zero bits or 2, whichever is greater.
  144.       <symbol> may be made globally visible by the .globl directive.
  145.  
  146.       .byte <exp1>[,<exp2>,"<string1>"...]
  147.       ------------------------------------
  148.       Assign the integer or string constant operands into successive
  149.       bytes of memory in the current section. Any combination of integer
  150.       and character string constant operands is permitted.
  151.  
  152.       .comm <symbol>,<size>
  153.       ---------------------
  154.       Allocate <size> bytes of space in the .bss section and assign
  155.       the value to that location to <symbol>. <symbol> is always made
  156.       globally visible. ".comm"-areas of less than 8 bytes in size are
  157.       aligned to word boundaries, otherwise to doubleword boundaries.
  158.  
  159.       .double <float1>[,<float2>...]
  160.       ------------------------------
  161.       If the current section location counter is not on a doubleword
  162.       boundary advance it to the next doubleword boundary. Then assign
  163.       the values of the operands as IEEE 754 double-precision 64-bit
  164.       format numbers to successive doublewords of memory in the current
  165.       section.
  166.  
  167.       .else
  168.       -----
  169.       Begins the "else"-part in a block of conditional assembly.
  170.  
  171.       .endif
  172.       ------
  173.       Ends a block of conditional assembly.
  174.  
  175.       .endm
  176.       -----
  177.       Ends a macro definition.
  178.  
  179.       .extern <symbol>
  180.       ----------------
  181.       See ".globl".
  182.  
  183.       .fail
  184.       -----
  185.       Abort assembly with displaying the error message "fail directive
  186.       encountered".
  187.  
  188.       .file "<file name>"
  189.       -------------------
  190.       Specify the source file name, which is included into the ELF object
  191.       file as a symbol of type "FILE" with local binding. In EHF objects,
  192.       it is used as unit name.
  193.  
  194.       .float <float1>[,<float2>...]
  195.       -----------------------------
  196.       If the current section location counter is not on a word boundary
  197.       advance it to the next word boundary. Then assign the values of the
  198.       operands as IEEE 754 single precision 32-bit format numbers to
  199.       successive words of memory in the current section.
  200.  
  201.       .global <symbol>
  202.       ----------------
  203.       See ".globl".
  204.  
  205.       .globl <symbol>
  206.       ---------------
  207.       Flag <symbol> as an external symbol, which means that <symbol> is
  208.       visible to all modules in the linking process. It may be either
  209.       defined or undefined.
  210.  
  211.       .half <exp1>[,<exp2>...]
  212.       ------------------------
  213.       If the current section location counter is not on a halfword
  214.       boundary, advance it to the next halfword boundary. Then, assign
  215.       the values of the operands into successive halfwords of memory in
  216.       the current section.
  217.  
  218.       .ident "<string>"
  219.       -----------------
  220.       Place an indentification string into the .comment section (ELF).
  221.  
  222.       .if<cond> <exp>
  223.       ---------------
  224.       The following block will only be assembled, if the condition <cond>
  225.       is valid for the expression <exp>. Available conditions are:
  226.       .if     assemble, if <exp> is not zero.
  227.       .ifeq   assemble, if <exp> is zero.
  228.       .ifne   assemble, if <exp> is not zero.
  229.       .ifgt   assemble, if <exp> is greater than zero.
  230.       .ifge   assemble, if <exp> is greater than zero or equal (positive).
  231.       .iflt   assemble, if <exp> is less than zero (negative).
  232.       .ifle   assemble, if <exp> is less than zero or equal.
  233.       .ifdef  assemble, if <exp> is defined.
  234.       .ifndef assemble, if <exp> is undefined.
  235.       A block of conditional assembly is ended by ".endif". A maximum of
  236.       eight if-levels is allowed.
  237.  
  238.       .include <file name>
  239.       --------------------
  240.       Includes another source text. Besides the current directory, all
  241.       include paths, defined by the -I option, are searched.
  242.  
  243.       .lcomm <symbol>,<size>[,<alignment>]
  244.       ------------------------------------
  245.       See ".bss".
  246.  
  247.       .local <symbol>
  248.       ---------------
  249.       Explicitely declare symbol to have local binding. It is not
  250.       visible outside the object file containing its definition.
  251.       <symbol> must be known (ELF only).
  252.  
  253.       .long <exp1>[,<exp2>...]
  254.       ------------------------
  255.       See ".word".
  256.  
  257.       .macro <name>
  258.       -------------
  259.       Define a new macro, called <name>. Macro parameters can be acces-
  260.       sed by \1 to \9. \0 is reserved for the branch hint. Example:
  261.       .macro  bdz
  262.               bc\0   18,0,\1
  263.       .endm
  264.       \@ will be replaced by a unique number on every macro invocation
  265.       and should be used when defining labels in a macro.
  266.  
  267.       .newsection <name>[,"<attributes>"]
  268.       -----------------------------------
  269.       This directives differs from the normal .section directive in the
  270.       case if a section called <name> already exists. .newsection will
  271.       then force the start of a new section with the same name and
  272.       effectively ends any further definition for the earlier section.
  273.       For the rest, see ".section".
  274.  
  275.       .sdreg <base_reg>
  276.       -----------------------------
  277.       Set a base register (r2-r31) for small data access.
  278.  
  279.       .section <name>[,"<attributes>"]
  280.       --------------------------------
  281.       Starts a new section named <name> or reactivate an old one. If
  282.       attributes are given for an already existing section, they must
  283.       match exactly. The section's name will also be defined as a new
  284.       symbol, which represents the section's start address.
  285.       The "<attributes>" string may consist of the following characters:
  286.       Section Contents:
  287.             c - section has code
  288.             d - section has initialized data
  289.             u - section has uninitialized data
  290.             i - section has directives (info section)
  291.             n - section can be discarded
  292.             R - remove section at link time
  293.       Section Protection:
  294.             r - section is readable
  295.             w - section is writable
  296.             x - section is executable
  297.             s - section is sharable
  298.       Section Alignment (only one):
  299.             0 - align to byte boundary
  300.             1 - align to halfword boundary
  301.             2 - align to word boundary
  302.             3 - align to doubleword boundary
  303.             4 - align to quadword boundary
  304.             5 - align to 32 byte boundary
  305.             6 - align to 64 byte boundary
  306.       Memory flags (EHF and ADOS only):
  307.             C - load section to Chip RAM
  308.             F - load section to Fast RAM
  309.  
  310.       .set <symbol>,<expression>
  311.       --------------------------
  312.       Create a new program symbol with the name <symbol> and assign to it
  313.       the value of <expression>. If <symbol> is already assigned, it will
  314.       contain a new value from now on. If <expression> is undefined in
  315.       pass 1 (because symbols in it are defined some lines later) it will
  316.       get a default value of '1', which is changed in pass 2 to the
  317.       correct value. So it is visible for .ifdef, etc.
  318.  
  319.       .size <symbol>,<size>
  320.       ---------------------
  321.       Set the size in bytes of an object defined at <symbol>.
  322.  
  323.       .short <exp1>[,<exp2>...]
  324.       -------------------------
  325.       See ".half".
  326.  
  327.       .space <exp>
  328.       ------------
  329.       Insert <exp> zero bytes into the current section.
  330.  
  331.       .string "<string1>"[,"<string2>"...]
  332.       ------------------------------------
  333.       Assign the characters in each string along with a final zero byte
  334.       to successive memory locations in the current section.
  335.  
  336.       .type <symbol>,<type>
  337.       ---------------------
  338.       Set type of symbol called <symbol> to <type>, which must be one of:
  339.       1: Object
  340.       2: Function
  341.       3: Section
  342.       4: File
  343.       The predefined symbols @object and @function are available for
  344.       this purpose.
  345.  
  346.       .uadouble <float1>[,<float2>...]
  347.       --------------------------------
  348.       Assign the values of the operands as IEEE 754 double-precision 64-
  349.       bit format numbers to successive eight-byte areas of memory in the
  350.       current section regardless of section alignment.
  351.  
  352.       .uafloat <float1>[,<float2>...]
  353.       -------------------------------
  354.       Assign the values of the operands as IEEE 754 single precision 32-
  355.       bit format numbers to successive 4-byte areas of memory in the
  356.       current section regardless of section alignment.
  357.  
  358.       .uahalf <exp1>[,<exp2>...]
  359.       --------------------------
  360.       Assign the values of the operands into successive two byte areas of
  361.       memory in the current section regardless of section alignment.
  362.  
  363.       .ualong <exp1>[,<exp2>...]
  364.       --------------------------
  365.       See ".uaword".
  366.  
  367.       .uashort <exp1>[,<exp2>...]
  368.       ---------------------------
  369.       See ".uahalf".
  370.  
  371.       .uaword <exp1>[,<exp2>...]
  372.       --------------------------
  373.       Assign the values of the operands into successive four-byte areas
  374.       of memory in the current section regardless of section alignment.
  375.  
  376.       .word <exp1>[,<exp2>...]
  377.       ------------------------
  378.       If the current section location counter is not on a word boundary
  379.       advance it to the next word boundary. Then assign the values of the
  380.       operands into successive words of memory in the current section.
  381.  
  382.  
  383. PREDEFINED SYMBOLS
  384.       There are two symbols, which are always updated by the assembler.
  385.       $       Current address counter value.
  386.       $NARG   Number of macro arguments during macro execution.
  387.               It is zero, when outside of a macro.
  388.  
  389.       The following symbols are constant and may be deactivated by
  390.       specifying the -R option.
  391.               .set r0,0
  392.               .set r1,1
  393.               .set r2,2
  394.               .set r3,3
  395.               .set r4,4
  396.               .set r5,5
  397.               .set r6,6
  398.               .set r7,7
  399.               .set r8,8
  400.               .set r9,9
  401.               .set r10,10
  402.               .set r11,11
  403.               .set r12,12
  404.               .set r13,13
  405.               .set r14,14
  406.               .set r15,15
  407.               .set r16,16
  408.               .set r17,17
  409.               .set r18,18
  410.               .set r19,19
  411.               .set r20,20
  412.               .set r21,21
  413.               .set r22,22
  414.               .set r23,23
  415.               .set r24,24
  416.               .set r25,25
  417.               .set r26,26
  418.               .set r27,27
  419.               .set r28,28
  420.               .set r29,29
  421.               .set r30,30
  422.               .set r31,31
  423.               .set f0,0
  424.               .set f1,1
  425.               .set f2,2
  426.               .set f3,3
  427.               .set f4,4
  428.               .set f5,5
  429.               .set f6,6
  430.               .set f7,7
  431.               .set f8,8
  432.               .set f9,9
  433.               .set f10,10
  434.               .set f11,11
  435.               .set f12,12
  436.               .set f13,13
  437.               .set f14,14
  438.               .set f15,15
  439.               .set f16,16
  440.               .set f17,17
  441.               .set f18,18
  442.               .set f19,19
  443.               .set f20,20
  444.               .set f21,21
  445.               .set f22,22
  446.               .set f23,23
  447.               .set f24,24
  448.               .set f25,25
  449.               .set f26,26
  450.               .set f27,27
  451.               .set f28,28
  452.               .set f29,29
  453.               .set f30,30
  454.               .set f31,31
  455.               .set cr0,0
  456.               .set cr1,1
  457.               .set cr2,2
  458.               .set cr3,3
  459.               .set cr4,4
  460.               .set cr5,5
  461.               .set cr6,6
  462.               .set cr7,7
  463.               .set lt,0
  464.               .set gt,1
  465.               .set eq,2
  466.               .set so,3
  467.               .set un,3
  468.               .set sp,1
  469.               .set rtoc,2
  470.               .set fp,31
  471.               .set fpscr,0
  472.               .set xer,1
  473.               .set lr,8
  474.               .set ctr,9
  475.  
  476.  
  477. PREDEFINED SECTIONS
  478.         .section .text,"crx3"
  479.         .section .data,"drw3"
  480.         .section .bss,"urw3"
  481.         .section .rodata,"dr3"
  482.         .section .tocd,"drw3"
  483.  
  484.  
  485. EXTENDED MNEMONICS
  486.       There is a huge set of extended mnemonics, proposed by Motorola
  487.       and IBM in the "PowerPC Programming Environments", to make the
  488.       programmer's life easier. Except for some 64-bit mnemonics (I only
  489.       downloaded the 32-bit manuals for now), pasm supports them all.
  490.  
  491.       Currently all extended mnemonics (except "la") are implemented
  492.       as macros and can be deactivated with the -X option.
  493.  
  494.       List of extended mnemonics
  495.       --------------------------
  496.       .macro subi
  497.        addi \1,\2,-(\3)
  498.       .endm
  499.       
  500.       .macro subis
  501.        addis \1,\2,-(\3)
  502.       .endm
  503.       
  504.       .macro subic
  505.        addic \1,\2,-(\3)
  506.       .endm
  507.       
  508.       .macro subic.
  509.        addic. \1,\2,-(\3)
  510.       .endm
  511.       
  512.       .macro sub
  513.        subf \1,\3,\2
  514.       .endm
  515.       
  516.       .macro sub.
  517.        subf. \1,\3,\2
  518.       .endm
  519.       
  520.       .macro subo
  521.        subfo \1,\3,\2
  522.       .endm
  523.       
  524.       .macro subo.
  525.        subfo. \1,\3,\2
  526.       .endm
  527.       
  528.       .macro subc
  529.        subfc \1,\3,\2
  530.       .endm
  531.       
  532.       .macro subc.
  533.        subfc. \1,\3,\2
  534.       .endm
  535.       
  536.       .macro subco
  537.        subfco \1,\3,\2
  538.       .endm
  539.       
  540.       .macro subco.
  541.        subfco. \1,\3,\2
  542.       .endm
  543.       
  544.       .macro cmpwi
  545.       .ifeq $NARG-2
  546.        cmpi 0,0,\1,\2
  547.       .else
  548.        cmpi \1,0,\2,\3
  549.       .endif
  550.       .endm
  551.       
  552.       .macro cmpw
  553.       .ifeq $NARG-2
  554.        cmp 0,0,\1,\2
  555.       .else
  556.        cmp \1,0,\2,\3
  557.       .endif
  558.       .endm
  559.       
  560.       .macro cmplwi
  561.       .ifeq $NARG-2
  562.        cmpli 0,0,\1,\2
  563.       .else
  564.        cmpli \1,0,\2,\3
  565.       .endif
  566.       .endm
  567.       
  568.       .macro cmplw
  569.       .ifeq $NARG-2
  570.        cmpl 0,0,\1,\2
  571.       .else
  572.        cmpl \1,0,\2,\3
  573.       .endif
  574.       .endm
  575.       
  576.       .macro cmpdi
  577.       .ifeq $NARG-2
  578.        cmpi 0,1,\1,\2
  579.       .else
  580.        cmpi \1,1,\2,\3
  581.       .endif
  582.       .endm
  583.       
  584.       .macro cmpd
  585.       .ifeq $NARG-2
  586.        cmp 0,1,\1,\2
  587.       .else
  588.        cmp \1,1,\2,\3
  589.       .endif
  590.       .endm
  591.       
  592.       .macro cmpldi
  593.       .ifeq $NARG-2
  594.        cmpli 0,1,\1,\2
  595.       .else
  596.        cmpli \1,1,\2,\3
  597.       .endif
  598.       .endm
  599.       
  600.       .macro cmpld
  601.       .ifeq $NARG-2
  602.        cmpl 0,1,\1,\2
  603.       .else
  604.        cmpl \1,1,\2,\3
  605.       .endif
  606.       .endm
  607.       
  608.       
  609.       .macro extlwi
  610.        rlwinm \1,\2,\4,0,(\3)-1
  611.       .endm
  612.       
  613.       .macro extlwi.
  614.        rlwinm. \1,\2,\4,0,(\3)-1
  615.       .endm
  616.       
  617.       .macro extrwi
  618.        rlwinm \1,\2,(\4)+(\3),32-(\3),31
  619.       .endm
  620.       
  621.       .macro extrwi.
  622.        rlwinm. \1,\2,(\4)+(\3),32-(\3),31
  623.       .endm
  624.       
  625.       .macro inslwi
  626.        rlwimi \1,\2,32-(\4),\4,((\4)+(\3))-1
  627.       .endm
  628.       
  629.       .macro inslwi.
  630.        rlwimi. \1,\2,32-(\4),\4,((\4)+(\3))-1
  631.       .endm
  632.       
  633.       .macro insrwi
  634.        rlwimi \1,\2,32-((\4)+(\3)),\4,((\4)+(\3))-1
  635.       .endm
  636.       
  637.       .macro insrwi.
  638.        rlwimi. \1,\2,32-((\4)+(\3)),\4,((\4)+(\3))-1
  639.       .endm
  640.       
  641.       .macro rotlwi
  642.        rlwinm \1,\2,\3,0,31
  643.       .endm
  644.       
  645.       .macro rotlwi.
  646.        rlwinm. \1,\2,\3,0,31
  647.       .endm
  648.       
  649.       .macro rotrwi
  650.        rlwinm \1,\2,32-(\3),0,31
  651.       .endm
  652.       
  653.       .macro rotrwi.
  654.        rlwinm. \1,\2,32-(\3),0,31
  655.       .endm
  656.       
  657.       .macro rotlw
  658.        rlwnm \1,\2,\3,0,31
  659.       .endm
  660.       
  661.       .macro rotlw.
  662.        rlwnm. \1,\2,\3,0,31
  663.       .endm
  664.       
  665.       .macro slwi
  666.        rlwinm \1,\2,\3,0,31-(\3)
  667.       .endm
  668.       
  669.       .macro slwi.
  670.        rlwinm. \1,\2,\3,0,31-(\3)
  671.       .endm
  672.       
  673.       .macro srwi
  674.        rlwinm \1,\2,32-(\3),\3,31
  675.       .endm
  676.       
  677.       .macro srwi.
  678.        rlwinm. \1,\2,32-(\3),\3,31
  679.       .endm
  680.       
  681.       .macro clrlwi
  682.        rlwinm \1,\2,0,\3,31
  683.       .endm
  684.       
  685.       .macro clrlwi.
  686.        rlwinm. \1,\2,0,\3,31
  687.       .endm
  688.       
  689.       .macro clrrwi
  690.        rlwinm \1,\2,0,0,31-(\3)
  691.       .endm
  692.       
  693.       .macro clrrwi.
  694.        rlwinm. \1,\2,0,0,31-(\3)
  695.       .endm
  696.       
  697.       .macro clrlslwi
  698.        rlwinm \1,\2,\4,(\3)-(\4),31-(\4)
  699.       .endm
  700.       
  701.       .macro clrlslwi.
  702.        rlwinm. \1,\2,\4,(\3)-(\4),31-(\4)
  703.       .endm
  704.       
  705.       
  706.       .macro bt
  707.        bc\0 12,\1,\2
  708.       .endm
  709.       
  710.       .macro bf
  711.        bc\0 4,\1,\2
  712.       .endm
  713.       
  714.       .macro bdnz
  715.        bc\0 16,0,\1
  716.       .endm
  717.       
  718.       .macro bdnzt
  719.        bc\0 8,\1,\2
  720.       .endm
  721.       
  722.       .macro bdnzf
  723.        bc\0 0,\1,\2
  724.       .endm
  725.       
  726.       .macro bdz
  727.        bc\0 18,0,\1
  728.       .endm
  729.       
  730.       .macro bdzt
  731.        bc\0 10,\1,\2
  732.       .endm
  733.       
  734.       .macro bdzf
  735.        bc\0 2,\1,\2
  736.       .endm
  737.       
  738.       .macro bta
  739.        bca\0 12,\1,\2
  740.       .endm
  741.       
  742.       .macro bfa
  743.        bca\0 4,\1,\2
  744.       .endm
  745.       
  746.       .macro bdnza
  747.        bca\0 16,0,\1
  748.       .endm
  749.       
  750.       .macro bdnzta
  751.        bca\0 8,\1,\2
  752.       .endm
  753.       
  754.       .macro bdnzfa
  755.        bca\0 0,\1,\2
  756.       .endm
  757.       
  758.       .macro bdza
  759.        bca\0 18,0,\1
  760.       .endm
  761.       
  762.       .macro bdzta
  763.        bca\0 10,\1,\2
  764.       .endm
  765.       
  766.       .macro bdzfa
  767.        bca\0 2,\1,\2
  768.       .endm
  769.       
  770.       .macro blr
  771.        bclr 20,0
  772.       .endm
  773.       
  774.       .macro btlr
  775.        bclr\0 12,\1
  776.       .endm
  777.       
  778.       .macro bflr
  779.        bclr\0 4,\1
  780.       .endm
  781.       
  782.       .macro bdnzlr
  783.        bclr\0 16,0
  784.       .endm
  785.       
  786.       .macro bdnztlr
  787.        bclr\0 8,\1
  788.       .endm
  789.       
  790.       .macro bdnzflr
  791.        bclr\0 0,\1
  792.       .endm
  793.       
  794.       .macro bdzlr
  795.        bclr\0 18,0
  796.       .endm
  797.       
  798.       .macro bdztlr
  799.        bclr\0 10,\1
  800.       .endm
  801.       
  802.       .macro bdzflr
  803.        bclr\0 2,\1
  804.       .endm
  805.       
  806.       .macro bctr
  807.        bcctr 20,0
  808.       .endm
  809.       
  810.       .macro btctr
  811.        bcctr\0 12,\1
  812.       .endm
  813.       
  814.       .macro bfctr
  815.        bcctr\0 4,\1
  816.       .endm
  817.       
  818.       .macro btl
  819.        bcl\0 12,\1,\2
  820.       .endm
  821.       
  822.       .macro bfl
  823.        bcl\0 4,\1,\2
  824.       .endm
  825.       
  826.       .macro bdnzl
  827.        bcl\0 16,0,\1
  828.       .endm
  829.       
  830.       .macro bdnztl
  831.        bcl\0 8,\1,\2
  832.       .endm
  833.       
  834.       .macro bdnzfl
  835.        bcl\0 0,\1,\2
  836.       .endm
  837.       
  838.       .macro bdzl
  839.        bcl\0 18,0,\1
  840.       .endm
  841.       
  842.       .macro bdztl
  843.        bcl\0 10,\1,\2
  844.       .endm
  845.       
  846.       .macro bdzfl
  847.        bcl\0 2,\1,\2
  848.       .endm
  849.       
  850.       .macro btla
  851.        bcla\0 12,\1,\2
  852.       .endm
  853.       
  854.       .macro bfla
  855.        bcla\0 4,\1,\2
  856.       .endm
  857.       
  858.       .macro bdnzla
  859.        bcla\0 16,0,\1
  860.       .endm
  861.       
  862.       .macro bdnztla
  863.        bcla\0 8,\1,\2
  864.       .endm
  865.       
  866.       .macro bdnzfla
  867.        bcla\0 0,\1,\2
  868.       .endm
  869.       
  870.       .macro bdzla
  871.        bcla\0 18,0,\1
  872.       .endm
  873.       
  874.       .macro bdztla
  875.        bcla\0 10,\1,\2
  876.       .endm
  877.       
  878.       .macro bdzfla
  879.        bcla\0 2,\1,\2
  880.       .endm
  881.       
  882.       .macro blrl
  883.        bclrl 20,0
  884.       .endm
  885.       
  886.       .macro btlrl
  887.        bclrl\0 12,\1
  888.       .endm
  889.       
  890.       .macro bflrl
  891.        bclrl\0 4,\1
  892.       .endm
  893.       
  894.       .macro bdnzlrl
  895.        bclrl\0 16,0
  896.       .endm
  897.       
  898.       .macro bdnztlrl
  899.        bclrl\0 8,\1
  900.       .endm
  901.       
  902.       .macro bdnzflrl
  903.        bclrl\0 0,\1
  904.       .endm
  905.       
  906.       .macro bdzlrl
  907.        bclrl\0 18,0
  908.       .endm
  909.       
  910.       .macro bdztlrl
  911.        bclrl\0 10,\1
  912.       .endm
  913.       
  914.       .macro bdzflrl
  915.        bclrl\0 2,\1
  916.       .endm
  917.       
  918.       .macro bctrl
  919.        bcctrl 20,0
  920.       .endm
  921.       
  922.       .macro btctrl
  923.        bcctrl\0 12,\1
  924.       .endm
  925.       
  926.       .macro bfctrl
  927.        bcctrl\0 4,\1
  928.       .endm
  929.       
  930.       
  931.       .macro blt
  932.       .ifeq $NARG-1
  933.        bc\0 12,0,\1
  934.       .else
  935.        bc\0 12,4*(\1)+0,\2
  936.       .endif
  937.       .endm
  938.       
  939.       .macro ble
  940.       .ifeq $NARG-1
  941.        bc\0 4,1,\1
  942.       .else
  943.        bc\0 4,4*(\1)+1,\2
  944.       .endif
  945.       .endm
  946.       
  947.       .macro beq
  948.       .ifeq $NARG-1
  949.        bc\0 12,2,\1
  950.       .else
  951.        bc\0 12,4*(\1)+2,\2
  952.       .endif
  953.       .endm
  954.       
  955.       .macro bge
  956.       .ifeq $NARG-1
  957.        bc\0 4,0,\1
  958.       .else
  959.        bc\0 4,4*(\1)+0,\2
  960.       .endif
  961.       .endm
  962.       
  963.       .macro bgt
  964.       .ifeq $NARG-1
  965.        bc\0 12,1,\1
  966.       .else
  967.        bc\0 12,4*(\1)+1,\2
  968.       .endif
  969.       .endm
  970.       
  971.       .macro bnl
  972.       .ifeq $NARG-1
  973.        bc\0 4,0,\1
  974.       .else
  975.        bc\0 4,4*(\1)+0,\2
  976.       .endif
  977.       .endm
  978.       
  979.       .macro bne
  980.       .ifeq $NARG-1
  981.        bc\0 4,2,\1
  982.       .else
  983.        bc\0 4,4*(\1)+2,\2
  984.       .endif
  985.       .endm
  986.       
  987.       .macro bng
  988.       .ifeq $NARG-1
  989.        bc\0 4,1,\1
  990.       .else
  991.        bc\0 4,4*(\1)+1,\2
  992.       .endif
  993.       .endm
  994.       
  995.       .macro bso
  996.       .ifeq $NARG-1
  997.        bc\0 12,3,\1
  998.       .else
  999.        bc\0 12,4*(\1)+3,\2
  1000.       .endif
  1001.       .endm
  1002.       
  1003.       .macro bns
  1004.       .ifeq $NARG-1
  1005.        bc\0 4,3,\1
  1006.       .else
  1007.        bc\0 4,4*(\1)+3,\2
  1008.       .endif
  1009.       .endm
  1010.       
  1011.       .macro bun
  1012.       .ifeq $NARG-1
  1013.        bc\0 12,3,\1
  1014.       .else
  1015.        bc\0 12,4*(\1)+3,\2
  1016.       .endif
  1017.       .endm
  1018.       
  1019.       .macro bnu
  1020.       .ifeq $NARG-1
  1021.        bc\0 4,3,\1
  1022.       .else
  1023.        bc\0 4,4*(\1)+3,\2
  1024.       .endif
  1025.       .endm
  1026.       
  1027.       .macro blta
  1028.       .ifeq $NARG-1
  1029.        bca\0 12,0,\1
  1030.       .else
  1031.        bca\0 12,4*(\1)+0,\2
  1032.       .endif
  1033.       .endm
  1034.       
  1035.       .macro blea
  1036.       .ifeq $NARG-1
  1037.        bca\0 4,1,\1
  1038.       .else
  1039.        bca\0 4,4*(\1)+1,\2
  1040.       .endif
  1041.       .endm
  1042.       
  1043.       .macro beqa
  1044.       .ifeq $NARG-1
  1045.        bca\0 12,2,\1
  1046.       .else
  1047.        bca\0 12,4*(\1)+2,\2
  1048.       .endif
  1049.       .endm
  1050.       
  1051.       .macro bgea
  1052.       .ifeq $NARG-1
  1053.        bca\0 4,0,\1
  1054.       .else
  1055.        bca\0 4,4*(\1)+0,\2
  1056.       .endif
  1057.       .endm
  1058.       
  1059.       .macro bgta
  1060.       .ifeq $NARG-1
  1061.        bca\0 12,1,\1
  1062.       .else
  1063.        bca\0 12,4*(\1)+1,\2
  1064.       .endif
  1065.       .endm
  1066.       
  1067.       .macro bnla
  1068.       .ifeq $NARG-1
  1069.        bca\0 4,0,\1
  1070.       .else
  1071.        bca\0 4,4*(\1)+0,\2
  1072.       .endif
  1073.       .endm
  1074.       
  1075.       .macro bnea
  1076.       .ifeq $NARG-1
  1077.        bca\0 4,2,\1
  1078.       .else
  1079.        bca\0 4,4*(\1)+2,\2
  1080.       .endif
  1081.       .endm
  1082.       
  1083.       .macro bnga
  1084.       .ifeq $NARG-1
  1085.        bca\0 4,1,\1
  1086.       .else
  1087.        bca\0 4,4*(\1)+1,\2
  1088.       .endif
  1089.       .endm
  1090.       
  1091.       .macro bsoa
  1092.       .ifeq $NARG-1
  1093.        bca\0 12,3,\1
  1094.       .else
  1095.        bca\0 12,4*(\1)+3,\2
  1096.       .endif
  1097.       .endm
  1098.       
  1099.       .macro bnsa
  1100.       .ifeq $NARG-1
  1101.        bca\0 4,3,\1
  1102.       .else
  1103.        bca\0 4,4*(\1)+3,\2
  1104.       .endif
  1105.       .endm
  1106.       
  1107.       .macro buna
  1108.       .ifeq $NARG-1
  1109.        bca\0 12,3,\1
  1110.       .else
  1111.        bca\0 12,4*(\1)+3,\2
  1112.       .endif
  1113.       .endm
  1114.       
  1115.       .macro bnua
  1116.       .ifeq $NARG-1
  1117.        bca\0 4,3,\1
  1118.       .else
  1119.        bca\0 4,4*(\1)+3,\2
  1120.       .endif
  1121.       .endm
  1122.       
  1123.       
  1124.       .macro bltlr
  1125.       .ifeq $NARG-1
  1126.        bclr\0 12,4*(\1)+0
  1127.       .else
  1128.        bclr\0 12,0
  1129.       .endif
  1130.       .endm
  1131.       
  1132.       .macro blelr
  1133.       .ifeq $NARG-1
  1134.        bclr\0 4,4*(\1)+1
  1135.       .else
  1136.        bclr\0 4,1
  1137.       .endif
  1138.       .endm
  1139.       
  1140.       .macro beqlr
  1141.       .ifeq $NARG-1
  1142.        bclr\0 12,4*(\1)+2
  1143.       .else
  1144.        bclr\0 12,2
  1145.       .endif
  1146.       .endm
  1147.       
  1148.       .macro bgelr
  1149.       .ifeq $NARG-1
  1150.        bclr\0 4,4*(\1)+0
  1151.       .else
  1152.        bclr\0 4,0
  1153.       .endif
  1154.       .endm
  1155.       
  1156.       .macro bgtlr
  1157.       .ifeq $NARG-1
  1158.        bclr\0 12,4*(\1)+1
  1159.       .else
  1160.        bclr\0 12,1
  1161.       .endif
  1162.       .endm
  1163.       
  1164.       .macro bnllr
  1165.       .ifeq $NARG-1
  1166.        bclr\0 4,4*(\1)+0
  1167.       .else
  1168.        bclr\0 4,0
  1169.       .endif
  1170.       .endm
  1171.       
  1172.       .macro bnelr
  1173.       .ifeq $NARG-1
  1174.        bclr\0 4,4*(\1)+2
  1175.       .else
  1176.        bclr\0 4,2
  1177.       .endif
  1178.       .endm
  1179.       
  1180.       .macro bnglr
  1181.       .ifeq $NARG-1
  1182.        bclr\0 4,4*(\1)+1
  1183.       .else
  1184.        bclr\0 4,1
  1185.       .endif
  1186.       .endm
  1187.       
  1188.       .macro bsolr
  1189.       .ifeq $NARG-1
  1190.        bclr\0 12,4*(\1)+3
  1191.       .else
  1192.        bclr\0 12,3
  1193.       .endif
  1194.       .endm
  1195.       
  1196.       .macro bnslr
  1197.       .ifeq $NARG-1
  1198.        bclr\0 4,4*(\1)+3
  1199.       .else
  1200.        bclr\0 4,3
  1201.       .endif
  1202.       .endm
  1203.       
  1204.       .macro bunlr
  1205.       .ifeq $NARG-1
  1206.        bclr\0 12,4*(\1)+3
  1207.       .else
  1208.        bclr\0 12,3
  1209.       .endif
  1210.       .endm
  1211.       
  1212.       .macro bnulr
  1213.       .ifeq $NARG-1
  1214.        bclr\0 4,4*(\1)+3
  1215.       .else
  1216.        bclr\0 4,3
  1217.       .endif
  1218.       .endm
  1219.       
  1220.       .macro bltctr
  1221.       .ifeq $NARG-1
  1222.        bcctr\0 12,4*(\1)+0
  1223.       .else
  1224.        bcctr\0 12,0
  1225.       .endif
  1226.       .endm
  1227.       
  1228.       .macro blectr
  1229.       .ifeq $NARG-1
  1230.        bcctr\0 4,4*(\1)+1
  1231.       .else
  1232.        bcctr\0 4,1
  1233.       .endif
  1234.       .endm
  1235.       
  1236.       .macro beqctr
  1237.       .ifeq $NARG-1
  1238.        bcctr\0 12,4*(\1)+2
  1239.       .else
  1240.        bcctr\0 12,2
  1241.       .endif
  1242.       .endm
  1243.       
  1244.       .macro bgectr
  1245.       .ifeq $NARG-1
  1246.        bcctr\0 4,4*(\1)+0
  1247.       .else
  1248.        bcctr\0 4,0
  1249.       .endif
  1250.       .endm
  1251.       
  1252.       .macro bgtctr
  1253.       .ifeq $NARG-1
  1254.        bcctr\0 12,4*(\1)+1
  1255.       .else
  1256.        bcctr\0 12,1
  1257.       .endif
  1258.       .endm
  1259.       
  1260.       .macro bnlctr
  1261.       .ifeq $NARG-1
  1262.        bcctr\0 4,4*(\1)+0
  1263.       .else
  1264.        bcctr\0 4,0
  1265.       .endif
  1266.       .endm
  1267.       
  1268.       .macro bnectr
  1269.       .ifeq $NARG-1
  1270.        bcctr\0 4,4*(\1)+2
  1271.       .else
  1272.        bcctr\0 4,2
  1273.       .endif
  1274.       .endm
  1275.       
  1276.       .macro bngctr
  1277.       .ifeq $NARG-1
  1278.        bcctr\0 4,4*(\1)+1
  1279.       .else
  1280.        bcctr\0 4,1
  1281.       .endif
  1282.       .endm
  1283.       
  1284.       .macro bsoctr
  1285.       .ifeq $NARG-1
  1286.        bcctr\0 12,4*(\1)+3
  1287.       .else
  1288.        bcctr\0 12,3
  1289.       .endif
  1290.       .endm
  1291.       
  1292.       .macro bnsctr
  1293.       .ifeq $NARG-1
  1294.        bcctr\0 4,4*(\1)+3
  1295.       .else
  1296.        bcctr\0 4,3
  1297.       .endif
  1298.       .endm
  1299.       
  1300.       .macro bunctr
  1301.       .ifeq $NARG-1
  1302.        bcctr\0 12,4*(\1)+3
  1303.       .else
  1304.        bcctr\0 12,3
  1305.       .endif
  1306.       .endm
  1307.       
  1308.       .macro bnuctr
  1309.       .ifeq $NARG-1
  1310.        bcctr\0 4,4*(\1)+3
  1311.       .else
  1312.        bcctr\0 4,3
  1313.       .endif
  1314.       .endm
  1315.       
  1316.       
  1317.       .macro bltl
  1318.       .ifeq $NARG-1
  1319.        bcl\0 12,0,\1
  1320.       .else
  1321.        bcl\0 12,4*(\1)+0,\2
  1322.       .endif
  1323.       .endm
  1324.       
  1325.       .macro blel
  1326.       .ifeq $NARG-1
  1327.        bcl\0 4,1,\1
  1328.       .else
  1329.        bcl\0 4,4*(\1)+1,\2
  1330.       .endif
  1331.       .endm
  1332.       
  1333.       .macro beql
  1334.       .ifeq $NARG-1
  1335.        bcl\0 12,2,\1
  1336.       .else
  1337.        bcl\0 12,4*(\1)+2,\2
  1338.       .endif
  1339.       .endm
  1340.       
  1341.       .macro bgel
  1342.       .ifeq $NARG-1
  1343.        bcl\0 4,0,\1
  1344.       .else
  1345.        bcl\0 4,4*(\1)+0,\2
  1346.       .endif
  1347.       .endm
  1348.       
  1349.       .macro bgtl
  1350.       .ifeq $NARG-1
  1351.        bcl\0 12,1,\1
  1352.       .else
  1353.        bcl\0 12,4*(\1)+1,\2
  1354.       .endif
  1355.       .endm
  1356.       
  1357.       .macro bnll
  1358.       .ifeq $NARG-1
  1359.        bcl\0 4,0,\1
  1360.       .else
  1361.        bcl\0 4,4*(\1)+0,\2
  1362.       .endif
  1363.       .endm
  1364.       
  1365.       .macro bnel
  1366.       .ifeq $NARG-1
  1367.        bcl\0 4,2,\1
  1368.       .else
  1369.        bcl\0 4,4*(\1)+2,\2
  1370.       .endif
  1371.       .endm
  1372.       
  1373.       .macro bngl
  1374.       .ifeq $NARG-1
  1375.        bcl\0 4,1,\1
  1376.       .else
  1377.        bcl\0 4,4*(\1)+1,\2
  1378.       .endif
  1379.       .endm
  1380.       
  1381.       .macro bsol
  1382.       .ifeq $NARG-1
  1383.        bcl\0 12,3,\1
  1384.       .else
  1385.        bcl\0 12,4*(\1)+3,\2
  1386.       .endif
  1387.       .endm
  1388.       
  1389.       .macro bnsl
  1390.       .ifeq $NARG-1
  1391.        bcl\0 4,3,\1
  1392.       .else
  1393.        bcl\0 4,4*(\1)+3,\2
  1394.       .endif
  1395.       .endm
  1396.       
  1397.       .macro bunl
  1398.       .ifeq $NARG-1
  1399.        bcl\0 12,3,\1
  1400.       .else
  1401.        bcl\0 12,4*(\1)+3,\2
  1402.       .endif
  1403.       .endm
  1404.       
  1405.       .macro bnul
  1406.       .ifeq $NARG-1
  1407.        bcl\0 4,3,\1
  1408.       .else
  1409.        bcl\0 4,4*(\1)+3,\2
  1410.       .endif
  1411.       .endm
  1412.       
  1413.       .macro bltla
  1414.       .ifeq $NARG-1
  1415.        bcla\0 12,0,\1
  1416.       .else
  1417.        bcla\0 12,4*(\1)+0,\2
  1418.       .endif
  1419.       .endm
  1420.       
  1421.       .macro blela
  1422.       .ifeq $NARG-1
  1423.        bcla\0 4,1,\1
  1424.       .else
  1425.        bcla\0 4,4*(\1)+1,\2
  1426.       .endif
  1427.       .endm
  1428.       
  1429.       .macro beqla
  1430.       .ifeq $NARG-1
  1431.        bcla\0 12,2,\1
  1432.       .else
  1433.        bcla\0 12,4*(\1)+2,\2
  1434.       .endif
  1435.       .endm
  1436.       
  1437.       .macro bgela
  1438.       .ifeq $NARG-1
  1439.        bcla\0 4,0,\1
  1440.       .else
  1441.        bcla\0 4,4*(\1)+0,\2
  1442.       .endif
  1443.       .endm
  1444.       
  1445.       .macro bgtla
  1446.       .ifeq $NARG-1
  1447.        bcla\0 12,1,\1
  1448.       .else
  1449.        bcla\0 12,4*(\1)+1,\2
  1450.       .endif
  1451.       .endm
  1452.       
  1453.       .macro bnlla
  1454.       .ifeq $NARG-1
  1455.        bcla\0 4,0,\1
  1456.       .else
  1457.        bcla\0 4,4*(\1)+0,\2
  1458.       .endif
  1459.       .endm
  1460.       
  1461.       .macro bnela
  1462.       .ifeq $NARG-1
  1463.        bcla\0 4,2,\1
  1464.       .else
  1465.        bcla\0 4,4*(\1)+2,\2
  1466.       .endif
  1467.       .endm
  1468.       
  1469.       .macro bngla
  1470.       .ifeq $NARG-1
  1471.        bcla\0 4,1,\1
  1472.       .else
  1473.        bcla\0 4,4*(\1)+1,\2
  1474.       .endif
  1475.       .endm
  1476.       
  1477.       .macro bsola
  1478.       .ifeq $NARG-1
  1479.        bcla\0 12,3,\1
  1480.       .else
  1481.        bcla\0 12,4*(\1)+3,\2
  1482.       .endif
  1483.       .endm
  1484.       
  1485.       .macro bnsla
  1486.       .ifeq $NARG-1
  1487.        bcla\0 4,3,\1
  1488.       .else
  1489.        bcla\0 4,4*(\1)+3,\2
  1490.       .endif
  1491.       .endm
  1492.       
  1493.       .macro bunla
  1494.       .ifeq $NARG-1
  1495.        bcla\0 12,3,\1
  1496.       .else
  1497.        bcla\0 12,4*(\1)+3,\2
  1498.       .endif
  1499.       .endm
  1500.       
  1501.       .macro bnula
  1502.       .ifeq $NARG-1
  1503.        bcla\0 4,3,\1
  1504.       .else
  1505.        bcla\0 4,4*(\1)+3,\2
  1506.       .endif
  1507.       .endm
  1508.       
  1509.       
  1510.       .macro bltlrl
  1511.       .ifeq $NARG-1
  1512.        bclrl\0 12,4*(\1)+0
  1513.       .else
  1514.        bclrl\0 12,0
  1515.       .endif
  1516.       .endm
  1517.       
  1518.       .macro blelrl
  1519.       .ifeq $NARG-1
  1520.        bclrl\0 4,4*(\1)+1
  1521.       .else
  1522.        bclrl\0 4,1
  1523.       .endif
  1524.       .endm
  1525.       
  1526.       .macro beqlrl
  1527.       .ifeq $NARG-1
  1528.        bclrl\0 12,4*(\1)+2
  1529.       .else
  1530.        bclrl\0 12,2
  1531.       .endif
  1532.       .endm
  1533.       
  1534.       .macro bgelrl
  1535.       .ifeq $NARG-1
  1536.        bclrl\0 4,4*(\1)+0
  1537.       .else
  1538.        bclrl\0 4,0
  1539.       .endif
  1540.       .endm
  1541.       
  1542.       .macro bgtlrl
  1543.       .ifeq $NARG-1
  1544.        bclrl\0 12,4*(\1)+1
  1545.       .else
  1546.        bclrl\0 12,1
  1547.       .endif
  1548.       .endm
  1549.       
  1550.       .macro bnllrl
  1551.       .ifeq $NARG-1
  1552.        bclrl\0 4,4*(\1)+0
  1553.       .else
  1554.        bclrl\0 4,0
  1555.       .endif
  1556.       .endm
  1557.       
  1558.       .macro bnelrl
  1559.       .ifeq $NARG-1
  1560.        bclrl\0 4,4*(\1)+2
  1561.       .else
  1562.        bclrl\0 4,2
  1563.       .endif
  1564.       .endm
  1565.       
  1566.       .macro bnglrl
  1567.       .ifeq $NARG-1
  1568.        bclrl\0 4,4*(\1)+1
  1569.       .else
  1570.        bclrl\0 4,1
  1571.       .endif
  1572.       .endm
  1573.       
  1574.       .macro bsolrl
  1575.       .ifeq $NARG-1
  1576.        bclrl\0 12,4*(\1)+3
  1577.       .else
  1578.        bclrl\0 12,3
  1579.       .endif
  1580.       .endm
  1581.       
  1582.       .macro bnslrl
  1583.       .ifeq $NARG-1
  1584.        bclrl\0 4,4*(\1)+3
  1585.       .else
  1586.        bclrl\0 4,3
  1587.       .endif
  1588.       .endm
  1589.       
  1590.       .macro bunlrl
  1591.       .ifeq $NARG-1
  1592.        bclrl\0 12,4*(\1)+3
  1593.       .else
  1594.        bclrl\0 12,3
  1595.       .endif
  1596.       .endm
  1597.       
  1598.       .macro bnulrl
  1599.       .ifeq $NARG-1
  1600.        bclrl\0 4,4*(\1)+3
  1601.       .else
  1602.        bclrl\0 4,3
  1603.       .endif
  1604.       .endm
  1605.       
  1606.       .macro bltctrl
  1607.       .ifeq $NARG-1
  1608.        bcctrl\0 12,4*(\1)+0
  1609.       .else
  1610.        bcctrl\0 12,0
  1611.       .endif
  1612.       .endm
  1613.       
  1614.       .macro blectrl
  1615.       .ifeq $NARG-1
  1616.        bcctrl\0 4,4*(\1)+1
  1617.       .else
  1618.        bcctrl\0 4,1
  1619.       .endif
  1620.       .endm
  1621.       
  1622.       .macro beqctrl
  1623.       .ifeq $NARG-1
  1624.        bcctrl\0 12,4*(\1)+2
  1625.       .else
  1626.        bcctrl\0 12,2
  1627.       .endif
  1628.       .endm
  1629.       
  1630.       .macro bgectrl
  1631.       .ifeq $NARG-1
  1632.        bcctrl\0 4,4*(\1)+0
  1633.       .else
  1634.        bcctrl\0 4,0
  1635.       .endif
  1636.       .endm
  1637.       
  1638.       .macro bgtctrl
  1639.       .ifeq $NARG-1
  1640.        bcctrl\0 12,4*(\1)+1
  1641.       .else
  1642.        bcctrl\0 12,1
  1643.       .endif
  1644.       .endm
  1645.       
  1646.       .macro bnlctrl
  1647.       .ifeq $NARG-1
  1648.        bcctrl\0 4,4*(\1)+0
  1649.       .else
  1650.        bcctrl\0 4,0
  1651.       .endif
  1652.       .endm
  1653.       
  1654.       .macro bnectrl
  1655.       .ifeq $NARG-1
  1656.        bcctrl\0 4,4*(\1)+2
  1657.       .else
  1658.        bcctrl\0 4,2
  1659.       .endif
  1660.       .endm
  1661.       
  1662.       .macro bngctrl
  1663.       .ifeq $NARG-1
  1664.        bcctrl\0 4,4*(\1)+1
  1665.       .else
  1666.        bcctrl\0 4,1
  1667.       .endif
  1668.       .endm
  1669.       
  1670.       .macro bsoctrl
  1671.       .ifeq $NARG-1
  1672.        bcctrl\0 12,4*(\1)+3
  1673.       .else
  1674.        bcctrl\0 12,3
  1675.       .endif
  1676.       .endm
  1677.       
  1678.       .macro bnsctrl
  1679.       .ifeq $NARG-1
  1680.        bcctrl\0 4,4*(\1)+3
  1681.       .else
  1682.        bcctrl\0 4,3
  1683.       .endif
  1684.       .endm
  1685.       
  1686.       .macro bunctrl
  1687.       .ifeq $NARG-1
  1688.        bcctrl\0 12,4*(\1)+3
  1689.       .else
  1690.        bcctrl\0 12,3
  1691.       .endif
  1692.       .endm
  1693.       
  1694.       .macro bnuctrl
  1695.       .ifeq $NARG-1
  1696.        bcctrl\0 4,4*(\1)+3
  1697.       .else
  1698.        bcctrl\0 4,3
  1699.       .endif
  1700.       .endm
  1701.       
  1702.       
  1703.       .macro crset
  1704.        creqv \1,\1,\1
  1705.       .endm
  1706.       
  1707.       .macro crclr
  1708.        crxor \1,\1,\1
  1709.       .endm
  1710.       
  1711.       .macro crmove
  1712.        cror \1,\2,\2
  1713.       .endm
  1714.       
  1715.       .macro crnot
  1716.        crnor \1,\2,\2
  1717.       .endm
  1718.       
  1719.       
  1720.       .macro trap
  1721.        tw 31,0,0
  1722.       .endm
  1723.       
  1724.       .macro twlt
  1725.        tw 16,\1,\2
  1726.       .endm
  1727.       
  1728.       .macro twle
  1729.        tw 20,\1,\2
  1730.       .endm
  1731.       
  1732.       .macro tweq
  1733.        tw 4,\1,\2
  1734.       .endm
  1735.       
  1736.       .macro twge
  1737.        tw 12,\1,\2
  1738.       .endm
  1739.       
  1740.       .macro twgt
  1741.        tw 8,\1,\2
  1742.       .endm
  1743.       
  1744.       .macro twnl
  1745.        tw 12,\1,\2
  1746.       .endm
  1747.       
  1748.       .macro twne
  1749.        tw 24,\1,\2
  1750.       .endm
  1751.       
  1752.       .macro twng
  1753.        tw 20,\1,\2
  1754.       .endm
  1755.       
  1756.       .macro twllt
  1757.        tw 2,\1,\2
  1758.       .endm
  1759.       
  1760.       .macro twlle
  1761.        tw 6,\1,\2
  1762.       .endm
  1763.       
  1764.       .macro twlge
  1765.        tw 5,\1,\2
  1766.       .endm
  1767.       
  1768.       .macro twlgt
  1769.        tw 1,\1,\2
  1770.       .endm
  1771.       
  1772.       .macro twlnl
  1773.        tw 5,\1,\2
  1774.       .endm
  1775.       
  1776.       .macro twlng
  1777.        tw 6,\1,\2
  1778.       .endm
  1779.       
  1780.       .macro twlti
  1781.        twi 16,\1,\2
  1782.       .endm
  1783.       
  1784.       .macro twlei
  1785.        twi 20,\1,\2
  1786.       .endm
  1787.       
  1788.       .macro tweqi
  1789.        twi 4,\1,\2
  1790.       .endm
  1791.       
  1792.       .macro twgei
  1793.        twi 12,\1,\2
  1794.       .endm
  1795.       
  1796.       .macro twgti
  1797.        twi 8,\1,\2
  1798.       .endm
  1799.       
  1800.       .macro twnli
  1801.        twi 12,\1,\2
  1802.       .endm
  1803.       
  1804.       .macro twnei
  1805.        twi 24,\1,\2
  1806.       .endm
  1807.       
  1808.       .macro twngi
  1809.        twi 20,\1,\2
  1810.       .endm
  1811.       
  1812.       .macro twllti
  1813.        twi 2,\1,\2
  1814.       .endm
  1815.       
  1816.       .macro twllei
  1817.        twi 6,\1,\2
  1818.       .endm
  1819.       
  1820.       .macro twlgei
  1821.        twi 5,\1,\2
  1822.       .endm
  1823.       
  1824.       .macro twlgti
  1825.        twi 1,\1,\2
  1826.       .endm
  1827.       
  1828.       .macro twlnli
  1829.        twi 5,\1,\2
  1830.       .endm
  1831.       
  1832.       .macro twlngi
  1833.        twi 6,\1,\2
  1834.       .endm
  1835.       
  1836.       .macro tdlt
  1837.        td 16,\1,\2
  1838.       .endm
  1839.       
  1840.       .macro tdle
  1841.        td 20,\1,\2
  1842.       .endm
  1843.       
  1844.       .macro tdeq
  1845.        td 4,\1,\2
  1846.       .endm
  1847.       
  1848.       .macro tdge
  1849.        td 12,\1,\2
  1850.       .endm
  1851.       
  1852.       .macro tdgt
  1853.        td 8,\1,\2
  1854.       .endm
  1855.       
  1856.       .macro tdnl
  1857.        td 12,\1,\2
  1858.       .endm
  1859.       
  1860.       .macro tdne
  1861.        td 24,\1,\2
  1862.       .endm
  1863.       
  1864.       .macro tdng
  1865.        td 20,\1,\2
  1866.       .endm
  1867.       
  1868.       .macro tdllt
  1869.        td 2,\1,\2
  1870.       .endm
  1871.       
  1872.       .macro tdlle
  1873.        td 6,\1,\2
  1874.       .endm
  1875.       
  1876.       .macro tdlge
  1877.        td 5,\1,\2
  1878.       .endm
  1879.       
  1880.       .macro tdlgt
  1881.        td 1,\1,\2
  1882.       .endm
  1883.       
  1884.       .macro tdlnl
  1885.        td 5,\1,\2
  1886.       .endm
  1887.       
  1888.       .macro tdlng
  1889.        td 6,\1,\2
  1890.       .endm
  1891.       
  1892.       .macro tdlti
  1893.        tdi 16,\1,\2
  1894.       .endm
  1895.       
  1896.       .macro tdlei
  1897.        tdi 20,\1,\2
  1898.       .endm
  1899.       
  1900.       .macro tdeqi
  1901.        tdi 4,\1,\2
  1902.       .endm
  1903.       
  1904.       .macro tdgei
  1905.        tdi 12,\1,\2
  1906.       .endm
  1907.       
  1908.       .macro tdgti
  1909.        tdi 8,\1,\2
  1910.       .endm
  1911.       
  1912.       .macro tdnli
  1913.        tdi 12,\1,\2
  1914.       .endm
  1915.       
  1916.       .macro tdnei
  1917.        tdi 24,\1,\2
  1918.       .endm
  1919.       
  1920.       .macro tdngi
  1921.        tdi 20,\1,\2
  1922.       .endm
  1923.       
  1924.       .macro tdllti
  1925.        tdi 2,\1,\2
  1926.       .endm
  1927.       
  1928.       .macro tdllei
  1929.        tdi 6,\1,\2
  1930.       .endm
  1931.       
  1932.       .macro tdlgei
  1933.        tdi 5,\1,\2
  1934.       .endm
  1935.       
  1936.       .macro tdlgti
  1937.        tdi 1,\1,\2
  1938.       .endm
  1939.       
  1940.       .macro tdlnli
  1941.        tdi 5,\1,\2
  1942.       .endm
  1943.       
  1944.       .macro tdlngi
  1945.        tdi 6,\1,\2
  1946.       .endm
  1947.       
  1948.       
  1949.       .macro mtxer
  1950.        mtspr 1,\1
  1951.       .endm
  1952.       
  1953.       .macro mtlr
  1954.        mtspr 8,\1
  1955.       .endm
  1956.       
  1957.       .macro mtctr
  1958.        mtspr 9,\1
  1959.       .endm
  1960.       
  1961.       .macro mtdsisr
  1962.        mtspr 18,\1
  1963.       .endm
  1964.       
  1965.       .macro mtdar
  1966.        mtspr 19,\1
  1967.       .endm
  1968.       
  1969.       .macro mtdec
  1970.        mtspr 22,\1
  1971.       .endm
  1972.       
  1973.       .macro mtsdr1
  1974.        mtspr 25,\1
  1975.       .endm
  1976.       
  1977.       .macro mtsrr0
  1978.        mtspr 26,\1
  1979.       .endm
  1980.       
  1981.       .macro mtsrr1
  1982.        mtspr 27,\1
  1983.       .endm
  1984.       
  1985.       .macro mtsprg
  1986.        mtspr 272+(\1),\2
  1987.       .endm
  1988.       
  1989.       .macro mtasr
  1990.        mtspr 280,\1
  1991.       .endm
  1992.       
  1993.       .macro mtear
  1994.        mtspr 282,\1
  1995.       .endm
  1996.       
  1997.       .macro mttbl
  1998.        mtspr 284,\1
  1999.       .endm
  2000.       
  2001.       .macro mttbu
  2002.        mtspr 285,\1
  2003.       .endm
  2004.       
  2005.       .macro mtibatu
  2006.        mtspr 528+2*(\1),\2
  2007.       .endm
  2008.       
  2009.       .macro mtibatl
  2010.        mtspr 529+2*(\1),\2
  2011.       .endm
  2012.       
  2013.       .macro mtdbatu
  2014.        mtspr 536+2*(\1),\2
  2015.       .endm
  2016.       
  2017.       .macro mtdbatl
  2018.        mtspr 537+2*(\1),\2
  2019.       .endm
  2020.       
  2021.       .macro mtdabr
  2022.        mtspr 1013,\1
  2023.       .endm
  2024.       
  2025.       .macro mfxer
  2026.        mfspr \1,1
  2027.       .endm
  2028.       
  2029.       .macro mflr
  2030.        mfspr \1,8
  2031.       .endm
  2032.       
  2033.       .macro mfctr
  2034.        mfspr \1,9
  2035.       .endm
  2036.       
  2037.       .macro mfdsisr
  2038.        mfspr \1,18
  2039.       .endm
  2040.       
  2041.       .macro mfdar
  2042.        mfspr \1,19
  2043.       .endm
  2044.       
  2045.       .macro mfdec
  2046.        mfspr 22,\1
  2047.       .endm
  2048.       
  2049.       .macro mfsdr1
  2050.        mfspr \1,25
  2051.       .endm
  2052.       
  2053.       .macro mfsrr0
  2054.        mfspr \1,26
  2055.       .endm
  2056.       
  2057.       .macro mfsrr1
  2058.        mfspr \1,27
  2059.       .endm
  2060.       
  2061.       .macro mfsprg
  2062.        mfspr \1,272+(\2)
  2063.       .endm
  2064.       
  2065.       .macro mfasr
  2066.        mfspr \1,280
  2067.       .endm
  2068.       
  2069.       .macro mfear
  2070.        mfspr \1,282
  2071.       .endm
  2072.       
  2073.       .macro mftbl
  2074.        mftb \1,268
  2075.       .endm
  2076.       
  2077.       .macro mftbu
  2078.        mftb \1,269
  2079.       .endm
  2080.       
  2081.       .macro mfpvr
  2082.        mfspr \1,287
  2083.       .endm
  2084.       
  2085.       .macro mfibatu
  2086.        mfspr \1,528+2*(\2)
  2087.       .endm
  2088.       
  2089.       .macro mfibatl
  2090.        mfspr \1,529+2*(\2)
  2091.       .endm
  2092.       
  2093.       .macro mfdbatu
  2094.        mfspr \1,536+2*(\2)
  2095.       .endm
  2096.       
  2097.       .macro mfdbatl
  2098.        mfspr \1,537+2*(\2)
  2099.       .endm
  2100.       
  2101.       .macro mfdabr
  2102.        mfspr \1,1013
  2103.       .endm
  2104.       
  2105.       
  2106.       .macro nop
  2107.        ori 0,0,0
  2108.       .endm
  2109.       
  2110.       .macro li
  2111.        addi \1,0,\2
  2112.       .endm
  2113.       
  2114.       .macro lis
  2115.        addis \1,0,\2
  2116.       .endm
  2117.       
  2118.       .macro mr
  2119.        or \1,\2,\2
  2120.       .endm
  2121.       
  2122.       .macro mr.
  2123.        or. \1,\2,\2
  2124.       .endm
  2125.       
  2126.       .macro not
  2127.        nor \1,\2,\2
  2128.       .endm
  2129.       
  2130.       .macro not.
  2131.        nor. \1,\2,\2
  2132.       .endm
  2133.       
  2134.       .macro mtcr
  2135.        mtcrf 0xff,\1
  2136.       .endm
  2137.  
  2138.  
  2139. BUGS
  2140.      Not all of the 64-bit extended mnemonics are supported.
  2141.  
  2142.  
  2143. Frank Wille                  05-Jul-1998                frank@phoenix.owl.de
  2144.